package com.taldh.design.patterns.factories.abstractfacotories.impl;

/**
 * date: 2020/5/24
 *
 * @author 袁小黑
 * @version 1.0.0
 */

public class PinganInsuranceCompany implements InsuranceFactory{

    @Override
    public Insurance createAccidentInsurance() {
        System.out.println("Pingan is creating an accident insurance.");
        System.out.println("平安公司正在出一份意外险");
        return new AccidentInsurance();
    }

    @Override
    public Insurance createLifeInsurance() {
        System.out.println("Pingan is creating an life insurance.");
        System.out.println("平安公司正在出一份人寿险");
        return new LifeInsurance();
    }

    @Override
    public Insurance createJunenileInsurance() {
        System.out.println("Pingan is creating an junenile insurance.");
        System.out.println("平安公司正在出一份儿童险");
        return new JunenileInsurance();
    }
}
